package net.quanter.sample.nacos.api;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.quanter.sample.nacos.dto.ResultDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.io.Serializable;

public interface UserService {

    @GetMapping("/user/{id}")
    ResultDTO<UserDTO> get(@PathVariable(value = "id") Integer id);


    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    class UserDTO implements Serializable {
        private static final long serialVersionUID = 1L;
        Integer id;
        String name;
    }
}
